<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta charset ="UTF-8">
    <title>RatifyLessonList</title>

    <style>
        table{
            border: 1px solid;
            margin: auto;
            width: 1300px;
        }
        td,th{
            text-align: center;
            border: 1px solid;
            height: 35px;
        }

         body {
             background-image: url("background.png");
             background-repeat: no-repeat;
             background-position: center center;
             background-size: cover;
         }

    </style>

</head>
<body>

<table>
    <caption>欢迎，<%=request.getSession().getAttribute("identity")%>&nbsp;<%=request.getSession().getAttribute("username")%><br>待处理课程申请信息表</caption>
    <tr>
        <th>申请编号</th>
        <th>课程编号</th>
        <th>学生</th>
        <th>课程名称</th>
        <th>老师</th>
        <th>状态</th>
        <th>申请原因</th>
        <th>驳回原因</th>
        <th>批准</th>
        <th>驳回</th>
    </tr>
    <c:forEach items="${ratifylessons}" var="ratifylesson">
        <tr>
            <td>${ratifylesson.code}</td>
            <td>${ratifylesson.lessoncode}</td>
            <td>${ratifylesson.student}</td>
            <td>${ratifylesson.lessonname}</td>
            <td>${ratifylesson.teacher}</td>
            <c:if test="${ratifylesson.ifratify==0}"><td>未审批</td></c:if>
            <c:if test="${ratifylesson.ifratify==1}"><td>主讲审批通过</td></c:if>
            <c:if test="${ratifylesson.ifratify==2}"><td>主讲已驳回申请</td></c:if>
            <c:if test="${ratifylesson.ifratify==3}"><td>审批完成</td></c:if>
            <c:if test="${ratifylesson.ifratify==4}"><td>主管已驳回申请</td></c:if>
            <td>${ratifylesson.applyreason}</td>
            <td>${ratifylesson.disapprovereason}</td>
            <c:if test="${ratifylesson.ifratify==0}"><td><a href="ratifyLessonApproveServlet?method=doGet&code=${ratifylesson.code}&ifratify=${ratifylesson.ifratify}&student=${ratifylesson.student}&lessoncode=${ratifylesson.lessoncode}&approve=1">批准</a> </td>
                <td><a href="ratifyLessonApproveServlet?method=doGet&code=${ratifylesson.code}&ifratify=${ratifylesson.ifratify}&student=${ratifylesson.student}&lessoncode=${ratifylesson.lessoncode}&approve=0">驳回</a></td></c:if>
            <c:if test="${ratifylesson.ifratify==2}"><td><a href="ratifyLessonApproveServlet?method=doGet&code=${ratifylesson.code}&ifratify=${ratifylesson.ifratify}&student=${ratifylesson.student}&lessoncode=${ratifylesson.lessoncode}&approve=1">批准</a></td> <td> </td></c:if>
            <c:if test="${ratifylesson.ifratify==1}"><td> </td><td><a href="ratifyLessonApproveServlet?method=doGet&code=${ratifylesson.code}&ifratify=${ratifylesson.ifratify}&student=${ratifylesson.student}&lessoncode=${ratifylesson.lessoncode}&approve=0">驳回</a></td></c:if>
            <c:if test="${ratifylesson.ifratify==3||ratifylesson.ifratify==4}"><td> </td><td> </td></c:if>
        </tr>
    </c:forEach>

</table>
<script>
</script>
</body>
</html>
